home *** CD-ROM | disk | FTP | other *** search
/ Programming in Microsoft Windows with C# / Programacion en Microsoft Windows con C#.iso / Codigo / Jugar con las fuentes / SimpleShear / SimpleShear.cs next >
Encoding:
Text File  |  2002-06-18  |  852 b   |  32 lines

  1. //------------------------------------------
  2. // SimpleShear.cs ⌐ 2001 by Charles Petzold
  3. //------------------------------------------
  4. using System;
  5. using System.Drawing;
  6. using System.Drawing.Drawing2D;
  7. using System.Windows.Forms;
  8.  
  9. class SimpleShear: FontMenuForm
  10. {
  11.      public new static void Main()
  12.      {
  13.           Application.Run(new SimpleShear());
  14.      }
  15.      public SimpleShear()
  16.      {
  17.           Text = "Inclinaci≤n simple";
  18.  
  19.           strText = "Inclinar";
  20.           font = new Font("Times New Roman", 72);
  21.      }
  22.      protected override void DoPage(Graphics grfx, Color clr, int cx, int cy)
  23.      {
  24.           Brush  brush = new SolidBrush(clr);
  25.           Matrix matx  = new Matrix();
  26.  
  27.           matx.Shear(0.5f, 0);
  28.           grfx.Transform = matx;
  29.  
  30.           grfx.DrawString(strText, font, brush, 0, 0);
  31.      }
  32. }